package com.paic.icore.test.demo.dao;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import com.paic.icore.test.demo.entity.User;

/**
 * 描述:
 *
 * @author HUXINGJIE666
 * @date 2017年12月25日上午9:25:26
 */
public interface UserRepository extends PagingAndSortingRepository<User, Long>, JpaSpecificationExecutor<User> {

	User findUserByName(String name);

	@Query("from User t where teamId = :id")
	List<User> queryFamilyList(@Param("id") Long id, Pageable pageable);
	void flush();
}
